Conversation
Reviewer's GuideThis PR enhances the HTML-to-PDF service by introducing an optional PdfOptions parameter across all export methods, updating interface and implementation signatures, and defining a new PdfOptions class to hold PDF-specific settings. Class diagram for new PdfOptions and updated IHtml2Pdf interfaceclassDiagram
class PdfOptions {
+bool Landscape
}
class IHtml2Pdf {
+PdfDataAsync(string url, PdfOptions? options = null) Task<byte[]>
+PdfStreamAsync(string url, PdfOptions? options = null) Task<Stream>
+PdfDataFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null) Task<byte[]>
+PdfStreamFromHtmlAsync(string html, IEnumerable<string>? links = null, IEnumerable<string>? scripts = null, PdfOptions? options = null) Task<Stream>
}
IHtml2Pdf --> PdfOptions : uses
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey there - I've reviewed your changes - here's some feedback:
- Add detailed XML doc comments for the new 'options' parameter on each interface method to clarify its purpose and usage.
- Consider extending PdfOptions with additional PDF settings (e.g., page size, margins, headers/footers) or renaming it to better reflect its current minimal properties.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Add detailed XML doc comments for the new 'options' parameter on each interface method to clarify its purpose and usage.
- Consider extending PdfOptions with additional PDF settings (e.g., page size, margins, headers/footers) or renaming it to better reflect its current minimal properties.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new PdfOptions parameter to the HTML-to-PDF conversion API, enabling configuration of PDF export settings such as landscape orientation. The changes introduce a new PdfOptions class and update all methods in the IHtml2Pdf interface to accept an optional options parameter.
- Added
PdfOptionsclass withLandscapeproperty for controlling PDF orientation - Updated all four methods in
IHtml2Pdfinterface to accept optionalPdfOptionsparameter - Updated version numbers for the package releases
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/BootstrapBlazor/Options/PdfOptions.cs | New class defining PDF export configuration options |
| src/BootstrapBlazor/Services/IHtml2Pdf.cs | Interface updated to include PdfOptions parameter in all methods |
| src/BootstrapBlazor/Services/DefaultHtml2PdfService.cs | Default implementation updated to match interface signature changes |
| src/BootstrapBlazor/BootstrapBlazor.csproj | Version numbers incremented for both beta and release candidate versions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7013 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 741 742 +1
Lines 32397 32398 +1
Branches 4485 4485
=========================================
+ Hits 32397 32398 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Link issues
fixes #7012
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Add a new PdfOptions class and extend the IHtml2Pdf interface and its default service implementation to support optional PDF customization parameters.
New Features:
Enhancements: